package chapter04.example15;
class Animal{
    public void shout(){
        System.out.println("喵喵······");
    }
}


class Dog extends Animal {
    public void shout(){
        System.out.println("汪汪······");
    }
    public void eat(){
        System.out.println("吃骨头······");
    }
}
public class example15 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Animal a1 =dog;
        a1.shout();
      //  a1.eat();Animal没有eat方法 所以eat无法使用
    }
}
